package com.Eastiy.EXO.View;

import android.content.Context;
import android.text.Html;
import android.view.View;
import android.widget.LinearLayout;

public class Tostbut extends LinearLayout {
    public boolean color = true;

    public Tostbut(Context context, LinearLayout linearLayout, int i, Object obj, Object obj2, boolean z, View.OnClickListener onClickListener, Object obj3) {
        super(context);
        int i2 = context.getResources().getDisplayMetrics().widthPixels;
        int i3 = context.getResources().getDisplayMetrics().heightPixels;
        NewView newView = new NewView(context, new Integer((int) (((double) i2) * 0.629d)), new Integer((int) (((double) i3) * 0.16d)), "LC", new Integer(1), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        NewView newView2 = new NewView(context, new Integer(-1), new Integer(-1), "LC", new Integer(1), 0, "#FFFFFF", (Object) null, (View.OnClickListener) null);
        NewView newView3 = new NewView(context, new Integer((int) (((double) i2) * 0.629d)), new Integer((int) (((double) i3) * 0.14d)), "CC", new Integer(0), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        NewView newView4 = new NewView(context, new Integer((int) (((double) i2) * 0.5d)), new Integer((int) (((double) i3) * 0.14d)), "CC", new Integer(1), 2, (Object) null, (Object) null, (View.OnClickListener) null);
        NewView newView5 = new NewView(context, new Integer((int) (((double) i2) * 0.1d)), new Integer((int) (((double) i3) * 0.08d)), "CC", new Integer(1), 1, "#FFFFFF", new Integer(15), (View.OnClickListener) null);
        NewText newText = new NewText(context, (Object) null, "CC", 14, "#FFFFFF");
        if (!z) {
            this.color = false;
            newView5.setBackgroundDrawable(ASUI.roundBG(new String[]{"#ADFFF3", "#E4FFC9", "RT"}, new Integer(15), (String) null, (Object) null));
            newView5.setOnClickListener(new View.OnClickListener(this, onClickListener, newView5, obj3, newText) {
                private final Tostbut this$0;
                private final NewView val$_s5;
                private final NewText val$_st6;
                private final View.OnClickListener val$run;
                private final Object val$sn;

                {
                    this.this$0 = r1;
                    this.val$run = r2;
                    this.val$_s5 = r3;
                    this.val$sn = r4;
                    this.val$_st6 = r5;
                }

                static Tostbut access$0(AnonymousClass100000001 r1) {
                    return r1.this$0;
                }

                @Override
                public void onClick(View view) {
                    ASUI.UIPlumb(view, 100, 0, 150, (Object) null);
                    if (this.val$run != null) {
                        this.val$run.onClick(view);
                    }
                    if (this.this$0.color) {
                        this.val$_s5.setBackgroundDrawable(ASUI.roundBG(new String[]{"#ADFFF3", "#E4FFC9", "RT"}, new Integer(15), (String) null, (Object) null));
                        if (this.val$sn != null) {
                            this.val$_st6.setText(ASUI.FontColor((String) this.val$sn));
                        } else {
                            this.val$_st6.setText(Html.fromHtml("</b><b>附魔"));
                        }
                        this.this$0.color = false;
                        return;
                    }
                    this.val$_s5.setBackgroundDrawable(ASUI.roundBG(new String[]{"#ADFFF3", "#E4FFC9", "RT"}, new Integer(15), (String) null, (Object) null));
                    if (this.val$sn != null) {
                        this.val$_st6.setText(ASUI.FontColor((String) this.val$sn));
                    } else {
                        this.val$_st6.setText(Html.fromHtml("</b><b>附魔"));
                    }
                    this.this$0.color = true;
                }
            });
            if (obj3 != null) {
                newText.setText(ASUI.FontColor((String) obj3));
            } else {
                newText.setText(Html.fromHtml("</b><b>附魔"));
            }
        } else {
            this.color = true;
            newView5.setBackgroundDrawable(ASUI.roundBG(new String[]{"#ADFFF3", "#E4FFC9", "RT"}, new Integer(15), (String) null, (Object) null));
            newView5.setOnClickListener(new View.OnClickListener(this, onClickListener, newView5, obj3, newText) {
                private final Tostbut this$0;
                private final NewView val$_s5;
                private final NewText val$_st6;
                private final View.OnClickListener val$run;
                private final Object val$sn;

                {
                    this.this$0 = r1;
                    this.val$run = r2;
                    this.val$_s5 = r3;
                    this.val$sn = r4;
                    this.val$_st6 = r5;
                }

                static Tostbut access$0(AnonymousClass100000000 r1) {
                    return r1.this$0;
                }

                @Override
                public void onClick(View view) {
                    ASUI.UIPlumb(view, 100, 0, 150, (Object) null);
                    if (this.val$run != null) {
                        this.val$run.onClick(view);
                    }
                    if (this.this$0.color) {
                        this.val$_s5.setBackgroundDrawable(ASUI.roundBG(new String[]{"#ADFFF3", "#E4FFC9", "RT"}, new Integer(15), (String) null, (Object) null));
                        if (this.val$sn != null) {
                            this.val$_st6.setText(ASUI.FontColor((String) this.val$sn));
                        } else {
                            this.val$_st6.setText(Html.fromHtml("</b><b>附魔"));
                        }
                        this.this$0.color = false;
                        return;
                    }
                    this.val$_s5.setBackgroundDrawable(ASUI.roundBG(new String[]{"#ADFFF3", "#E4FFC9", "RT"}, new Integer(15), (String) null, (Object) null));
                    if (this.val$sn != null) {
                        this.val$_st6.setText(ASUI.FontColor((String) this.val$sn));
                    } else {
                        this.val$_st6.setText(Html.fromHtml("</b><b>附魔"));
                    }
                    this.this$0.color = true;
                }
            });
            if (obj3 != null) {
                newText.setText(ASUI.FontColor((String) obj3));
            } else {
                newText.setText(Html.fromHtml("</b><b>附魔"));
            }
        }
        NewText newText2 = new NewText(context, (Object) null, "LC", 15, "#E4FFC9");
        newText2.setText(ASUI.FontColor(new StringBuffer().append(new StringBuffer().append("§l").append(obj).toString()).append("").toString()));
        NewText newText3 = new NewText(context, (Object) null, "LC", 11, "#ADFFF3");
        newText3.setText(ASUI.FontColor((String) obj2));
        if (i != 1) {
            newView.addView(newView2);
        }
        linearLayout.addView(newView3);
        newView3.addView(newView4);
        newView3.addView(newView5);
        newView4.addView(newText2);
        newView4.addView(newText3);
        newView5.addView(newText);
        ASUI.UIPlumb(linearLayout, 100, 0, 150, (Object) null);
        ASUI.UIFadein(newView2, 0, 100, 300);
        ASUI.UIFadein(newView3, 0, 100, 300);
    }
}
